﻿using System;
using Jxym.DBUtility;
using Jxym.wlkc2011.Module.Default.model;
using Newtonsoft.Json;

namespace Jxym.wlkc2011.Module.Default.SERVER.User
{
    public partial class DutiesGetModel : System.Web.UI.Page
    {
        string str = "{ID:0,Name:'未知'}";

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.Params["dutiesId"] != null)
                {
                    if (Request.Params["dutiesId"] != "")
                    {
                        int depmetId = Convert.ToInt32(Request.Params["dutiesId"]);
                        MsSqlDal<Duties> iD = new MsSqlDal<Duties>();
                        Duties dInfo = iD.GetModel("ID=" + depmetId, null);
                        if (dInfo != null)
                        {
                            str = JsonConvert.SerializeObject(dInfo);
                        }
                    }
                }
                Response.Write(str);
            }
        }
    }
}